package work20241204.b_static;

/**
 * @author zdl
 * @date 2024/12/4
 */

class Person{
    String name;
    static int age;

}
public class StaticDemo{
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.name = "zhangsan";
        Person.age = 21;
        System.out.println(p1.name+" "+Person.age);
        Person p2 = new Person();
        p2.name = "zhangsan";
        Person.age = 99;
        System.out.println(p2.name+" "+Person.age);
    }
}